package com.api.tiny.mirror.service.product.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tiny.mirror.basic.web.validation.annotation.CollectionVerify;
import com.tiny.mirror.service.product.enums.AbilityLhcStrategyEnum;
import com.tiny.mirror.service.product.enums.AbilityLhcTypeEnum;
import java.math.BigDecimal;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: liujsh
 * @Description:
 * @Date: Create in 2023/10/19
 */
@Getter
@Setter
public class CheckAbilityLhcPlayRequest {

  @NotNull
  @JsonProperty(value = "type")
  private AbilityLhcTypeEnum type;
  @NotNull
  @JsonProperty(value = "strategy")
  private AbilityLhcStrategyEnum strategy;
  @NotNull
  @JsonProperty(value = "lhc_num")
  private LhcNumberRequest lhcNum;
  @CollectionVerify(nullable = false, min = 1, max = 1000)
  @JsonProperty(value = "item_list")
  private List<LhcItemRequest> itemList;
  // 返利百分比
  @JsonProperty(value = "reward_percent")
  private BigDecimal rewardPercent;
  // 购买总价
  @JsonProperty(value = "total_amount")
  private BigDecimal totalAmount;

  @Getter
  @Setter
  public static class LhcItemRequest {

    // 项目唯一值
    @JsonProperty(value = "code")
    private String code;
    // 单个项目
    @JsonProperty(value = "item")
    private String item;
    // 多个项目
    @JsonProperty(value = "items")
    private List<String> items;
    // 金额
    @JsonProperty(value = "amount")
    private BigDecimal amount;
    // 赔率
    @JsonProperty(value = "odds")
    private BigDecimal odds;
  }

  @Getter
  @Setter
  public static class LhcNumberRequest {

    private Integer num1;
    private Integer num2;
    private Integer num3;
    private Integer num4;
    private Integer num5;
    private Integer num6;
    private Integer luckyNum;
  }
}
